package com.sasis.model;
// Generated 2007-5-8 18:05:40 by Hibernate Tools 3.1.0.beta4

import java.sql.Timestamp;


/**
 * @struts.form include-all="true" extends="BaseForm"
 * @hibernate.class
 *         table="FLIGHT_INFO"
 *     
 */

public class FlightInfo extends com.sasis.model.BaseObject implements java.io.Serializable {


    // Fields    

    private Integer id;
    private String flightNum;

    private Timestamp flightDate;

 

    private String departureAirport;
    private String arrivalAirport;
    private Timestamp std;
    private Timestamp etd;
    private Timestamp atd;
    private Timestamp sta;
    private Timestamp eta;
    private Timestamp ata;
    private Timestamp doorCloseTime;
    private Timestamp doorOpenTime;
    private Timestamp onBoardTime;
    private String onBoardGate;
    private String flgDelay;
    private String flgCs;
    private String acType;
    private String acReg;
    private String captain;
    private int econNum;
    private int passagerNum;
    private int passagerTotal;
    private int vipNum;
    private int transferNum;
    
    //add by ewen
    private String depaName;
    private String arrName;
    private String flightState;
    private String dan;
    private String aan;
    private String port;
    protected String needFood;
    protected String needHotel;
    protected String needCompensation;
    private String econNumStr;
    private String passagerNumStr;
    private String passagerTotalStr;
    private String lessEtd;
    private String moreStd;
    private String abnomal;
    
    // Constructors

    public String getAan() {
		return aan;
	}


	public void setAan(String aan) {
		this.aan = aan;
	}


	public String getDan() {
		return dan;
	}


	public void setDan(String dan) {
		this.dan = dan;
	}


	public String getArrName() {
		return arrName;
	}


	public void setArrName(String arrName) {
		this.arrName = arrName;
	}


	public String getDepaName() {
		return depaName;
	}


	public void setDepaName(String depaName) {
		this.depaName = depaName;
	}


	public int getEconNum() {
		if(null!=econNumStr&&!"".equals(econNumStr))
			return Integer.parseInt(econNumStr);
		return econNum;
	}


	public void setEconNum(int econNum) {
		this.econNum = econNum;
	}


	public int getPassagerNum() {
		if(null!=passagerNumStr&&!"".equals(passagerNumStr))
			return Integer.parseInt(passagerNumStr);
		return passagerNum;
	}


	public void setPassagerNum(int passagerNum) {
		this.passagerNum = passagerNum;
	}


	public int getPassagerTotal() {
		if(null!=passagerTotalStr&&!"".equals(passagerTotalStr))
			return Integer.parseInt(passagerTotalStr);
		return passagerTotal;
	}


	public void setPassagerTotal(int passagerTotal) {
		this.passagerTotal = passagerTotal;
	}


	public int getTransferNum() {
		return transferNum;
	}


	public void setTransferNum(int transferNum) {
		this.transferNum = transferNum;
	}


	public int getVipNum() {
		return vipNum;
	}


	public void setVipNum(int vipNum) {
		this.vipNum = vipNum;
	}


	/** default constructor */
    public FlightInfo() {
    }

    
    /** full constructor */

    public FlightInfo(String flightNum, Timestamp flightDate, String departureAirport, String arrivalAirport, Timestamp std, Timestamp etd, Timestamp atd, Timestamp sta, Timestamp eta, Timestamp ata, Timestamp doorCloseTime, Timestamp doorOpenTime, Timestamp onBoardTime, String onBoardGate, String flgDelay, String flgCs, String acType, String acReg, String captain) {


        this.flightNum = flightNum;
        this.flightDate = flightDate;
        this.departureAirport = departureAirport;
        this.arrivalAirport = arrivalAirport;
        this.std = std;
        this.etd = etd;
        this.atd = atd;
        this.sta = sta;
        this.eta = eta;
        this.ata = ata;
        this.doorCloseTime = doorCloseTime;
        this.doorOpenTime = doorOpenTime;
        this.onBoardTime = onBoardTime;
        this.onBoardGate = onBoardGate;
        this.flgDelay = flgDelay;
        this.flgCs = flgCs;
        this.acType = acType;
        this.acReg = acReg;
        this.captain = captain;
    }
    

   
    // Property accessors
    /**       
     *      *            @hibernate.id
     *             generator-class="native"
     *             type="java.lang.Integer"
     *             column="ID"
     *         
     */

    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
    /**       
     *      *            @hibernate.property
     *             column="FLIGHT_NUM"
     *             length="8"
     *         
     */

    public String getFlightNum() {
        return this.flightNum;
    }
    
    public void setFlightNum(String flightNum) {
        this.flightNum = flightNum;
    }
    /**       
     *      *            @hibernate.property
     *             column="FLIGHT_DATE"
     *             length="7"
     *         
     */


    public Timestamp getFlightDate() {


        return this.flightDate;
    }
    

    public void setFlightDate(Timestamp flightDate) {



        this.flightDate = flightDate;
    }
    /**       
     *      *            @hibernate.property
     *             column="DEPARTURE_AIRPORT"
     *             length="4"
     *         
     */

    public String getDepartureAirport() {
        return this.departureAirport;
    }
    
    public void setDepartureAirport(String departureAirport) {
        this.departureAirport = departureAirport;
    }
    /**       
     *      *            @hibernate.property
     *             column="ARRIVAL_AIRPORT"
     *             length="4"
     *         
     */

    public String getArrivalAirport() {
        return this.arrivalAirport;
    }
    
    public void setArrivalAirport(String arrivalAirport) {
        this.arrivalAirport = arrivalAirport;
    }
    /**       
     *      *            @hibernate.property
     *             column="STD"
     *             length="7"
     *         
     */

    public Timestamp getStd() {
        return this.std;
    }
  
    
    public void setStd(Timestamp std) {
        this.std = std;
    }
    /**       
     *      *            @hibernate.property
     *             column="ETD"
     *             length="7"
     *         
     */

    public Timestamp getEtd() {
        return this.etd;
    }
    
    public void setEtd(Timestamp etd) {
        this.etd = etd;
    }
    /**       
     *      *            @hibernate.property
     *             column="ATD"
     *             length="7"
     *         
     */

    public Timestamp getAtd() {
        return this.atd;
    }
    
    public void setAtd(Timestamp atd) {
        this.atd = atd;
    }
    /**       
     *      *            @hibernate.property
     *             column="STA"
     *             length="7"
     *         
     */

    public Timestamp getSta() {
        return this.sta;
    }
    
    public void setSta(Timestamp sta) {
        this.sta = sta;
    }
    /**       
     *      *            @hibernate.property
     *             column="ETA"
     *             length="7"
     *         
     */

    public Timestamp getEta() {
        return this.eta;
    }
    
    public void setEta(Timestamp eta) {
        this.eta = eta;
    }
    /**       
     *      *            @hibernate.property
     *             column="ATA"
     *             length="7"
     *         
     */

    public Timestamp getAta() {
        return this.ata;
    }
    
    public void setAta(Timestamp ata) {
        this.ata = ata;
    }
    /**       
     *      *            @hibernate.property
     *             column="DOOR_CLOSE_TIME"
     *             length="7"
     *         
     */

    public Timestamp getDoorCloseTime() {
        return this.doorCloseTime;
    }
    
    public void setDoorCloseTime(Timestamp doorCloseTime) {
        this.doorCloseTime = doorCloseTime;
    }
    /**       
     *      *            @hibernate.property
     *             column="DOOR_OPEN_TIME"
     *             length="7"
     *         
     */

    public Timestamp getDoorOpenTime() {
        return this.doorOpenTime;
    }
    
    public void setDoorOpenTime(Timestamp doorOpenTime) {
        this.doorOpenTime = doorOpenTime;
    }
    /**       
     *      *            @hibernate.property
     *             column="ON_BOARD_TIME"
     *             length="7"
     *         
     */

    public Timestamp getOnBoardTime() {
        return this.onBoardTime;
    }
    
    public void setOnBoardTime(Timestamp onBoardTime) {
        this.onBoardTime = onBoardTime;
    }
    /**       
     *      *            @hibernate.property
     *             column="ON_BOARD_GATE"
     *             length="8"
     *         
     */

    public String getOnBoardGate() {
        return this.onBoardGate;
    }
    
    public void setOnBoardGate(String onBoardGate) {
        this.onBoardGate = onBoardGate;
    }
    /**       
     *      *            @hibernate.property
     *             column="FLG_DELAY"
     *             length="1"
     *         
     */

    public String getFlgDelay() {
        return this.flgDelay;
    }
    
    public void setFlgDelay(String flgDelay) {
        this.flgDelay = flgDelay;
    }
    /**       
     *      *            @hibernate.property
     *             column="FLG_CS"
     *             length="1"
     *         
     */

    public String getFlgCs() {
        return this.flgCs;
    }
    
    public void setFlgCs(String flgCs) {
        this.flgCs = flgCs;
    }
    /**       
     *      *            @hibernate.property
     *             column="AC_TYPE"
     *             length="10"
     *         
     */

    public String getAcType() {
        return this.acType;
    }
    
    public void setAcType(String acType) {
        this.acType = acType;
    }
    /**       
     *      *            @hibernate.property
     *             column="AC_REG"
     *             length="10"
     *         
     */

    public String getAcReg() {
        return this.acReg;
    }
    
    public void setAcReg(String acReg) {
        this.acReg = acReg;
    }
    /**       
     *      *            @hibernate.property
     *             column="CAPTAIN"
     *             length="32"
     *         
     */

    public String getCaptain() {
        return this.captain;
    }
    
    public void setCaptain(String captain) {
        this.captain = captain;
    }
   
    public String getFlightState() {
    	return flightState;
    }

    public void setFlightState(String flightState) {
    	this.flightState = flightState;
    } 
    /**
     * toString
     * @return String
     */
     public String toString() {
	  StringBuffer buffer = new StringBuffer();

      buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
      buffer.append("flightNum").append("='").append(getFlightNum()).append("' ");			
      buffer.append("flightDate").append("='").append(getFlightDate()).append("' ");			
      buffer.append("departureAirport").append("='").append(getDepartureAirport()).append("' ");			
      buffer.append("arrivalAirport").append("='").append(getArrivalAirport()).append("' ");			
      buffer.append("std").append("='").append(getStd()).append("' ");			
      buffer.append("etd").append("='").append(getEtd()).append("' ");			
      buffer.append("atd").append("='").append(getAtd()).append("' ");			
      buffer.append("sta").append("='").append(getSta()).append("' ");			
      buffer.append("eta").append("='").append(getEta()).append("' ");			
      buffer.append("ata").append("='").append(getAta()).append("' ");			
      buffer.append("doorCloseTime").append("='").append(getDoorCloseTime()).append("' ");			
      buffer.append("doorOpenTime").append("='").append(getDoorOpenTime()).append("' ");			
      buffer.append("onBoardTime").append("='").append(getOnBoardTime()).append("' ");			
      buffer.append("onBoardGate").append("='").append(getOnBoardGate()).append("' ");			
      buffer.append("flgDelay").append("='").append(getFlgDelay()).append("' ");			
      buffer.append("flgCs").append("='").append(getFlgCs()).append("' ");			
      buffer.append("acType").append("='").append(getAcType()).append("' ");			
      buffer.append("acReg").append("='").append(getAcReg()).append("' ");			
      buffer.append("captain").append("='").append(getCaptain()).append("' ");			
      buffer.append("]");
      
      return buffer.toString();
     }


   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof FlightInfo) ) return false;
		 FlightInfo castOther = ( FlightInfo ) other; 
         
		 return ( (this.getId()==castOther.getId()) || ( this.getId()!=null && castOther.getId()!=null && this.getId().equals(castOther.getId()) ) )
 && ( (this.getFlightNum()==castOther.getFlightNum()) || ( this.getFlightNum()!=null && castOther.getFlightNum()!=null && this.getFlightNum().equals(castOther.getFlightNum()) ) )
 && ( (this.getFlightDate()==castOther.getFlightDate()) || ( this.getFlightDate()!=null && castOther.getFlightDate()!=null && this.getFlightDate().equals(castOther.getFlightDate()) ) )
 && ( (this.getDepartureAirport()==castOther.getDepartureAirport()) || ( this.getDepartureAirport()!=null && castOther.getDepartureAirport()!=null && this.getDepartureAirport().equals(castOther.getDepartureAirport()) ) )
 && ( (this.getArrivalAirport()==castOther.getArrivalAirport()) || ( this.getArrivalAirport()!=null && castOther.getArrivalAirport()!=null && this.getArrivalAirport().equals(castOther.getArrivalAirport()) ) )
 && ( (this.getStd()==castOther.getStd()) || ( this.getStd()!=null && castOther.getStd()!=null && this.getStd().equals(castOther.getStd()) ) )
 && ( (this.getEtd()==castOther.getEtd()) || ( this.getEtd()!=null && castOther.getEtd()!=null && this.getEtd().equals(castOther.getEtd()) ) )
 && ( (this.getAtd()==castOther.getAtd()) || ( this.getAtd()!=null && castOther.getAtd()!=null && this.getAtd().equals(castOther.getAtd()) ) )
 && ( (this.getSta()==castOther.getSta()) || ( this.getSta()!=null && castOther.getSta()!=null && this.getSta().equals(castOther.getSta()) ) )
 && ( (this.getEta()==castOther.getEta()) || ( this.getEta()!=null && castOther.getEta()!=null && this.getEta().equals(castOther.getEta()) ) )
 && ( (this.getAta()==castOther.getAta()) || ( this.getAta()!=null && castOther.getAta()!=null && this.getAta().equals(castOther.getAta()) ) )
 && ( (this.getDoorCloseTime()==castOther.getDoorCloseTime()) || ( this.getDoorCloseTime()!=null && castOther.getDoorCloseTime()!=null && this.getDoorCloseTime().equals(castOther.getDoorCloseTime()) ) )
 && ( (this.getDoorOpenTime()==castOther.getDoorOpenTime()) || ( this.getDoorOpenTime()!=null && castOther.getDoorOpenTime()!=null && this.getDoorOpenTime().equals(castOther.getDoorOpenTime()) ) )
 && ( (this.getOnBoardTime()==castOther.getOnBoardTime()) || ( this.getOnBoardTime()!=null && castOther.getOnBoardTime()!=null && this.getOnBoardTime().equals(castOther.getOnBoardTime()) ) )
 && ( (this.getOnBoardGate()==castOther.getOnBoardGate()) || ( this.getOnBoardGate()!=null && castOther.getOnBoardGate()!=null && this.getOnBoardGate().equals(castOther.getOnBoardGate()) ) )
 && ( (this.getFlgDelay()==castOther.getFlgDelay()) || ( this.getFlgDelay()!=null && castOther.getFlgDelay()!=null && this.getFlgDelay().equals(castOther.getFlgDelay()) ) )
 && ( (this.getFlgCs()==castOther.getFlgCs()) || ( this.getFlgCs()!=null && castOther.getFlgCs()!=null && this.getFlgCs().equals(castOther.getFlgCs()) ) )
 && ( (this.getAcType()==castOther.getAcType()) || ( this.getAcType()!=null && castOther.getAcType()!=null && this.getAcType().equals(castOther.getAcType()) ) )
 && ( (this.getAcReg()==castOther.getAcReg()) || ( this.getAcReg()!=null && castOther.getAcReg()!=null && this.getAcReg().equals(castOther.getAcReg()) ) )
 && ( (this.getCaptain()==castOther.getCaptain()) || ( this.getCaptain()!=null && castOther.getCaptain()!=null && this.getCaptain().equals(castOther.getCaptain()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getId() == null ? 0 : this.getId().hashCode() );
         result = 37 * result + ( getFlightNum() == null ? 0 : this.getFlightNum().hashCode() );
         result = 37 * result + ( getFlightDate() == null ? 0 : this.getFlightDate().hashCode() );
         result = 37 * result + ( getDepartureAirport() == null ? 0 : this.getDepartureAirport().hashCode() );
         result = 37 * result + ( getArrivalAirport() == null ? 0 : this.getArrivalAirport().hashCode() );
         result = 37 * result + ( getStd() == null ? 0 : this.getStd().hashCode() );
         result = 37 * result + ( getEtd() == null ? 0 : this.getEtd().hashCode() );
         result = 37 * result + ( getAtd() == null ? 0 : this.getAtd().hashCode() );
         result = 37 * result + ( getSta() == null ? 0 : this.getSta().hashCode() );
         result = 37 * result + ( getEta() == null ? 0 : this.getEta().hashCode() );
         result = 37 * result + ( getAta() == null ? 0 : this.getAta().hashCode() );
         result = 37 * result + ( getDoorCloseTime() == null ? 0 : this.getDoorCloseTime().hashCode() );
         result = 37 * result + ( getDoorOpenTime() == null ? 0 : this.getDoorOpenTime().hashCode() );
         result = 37 * result + ( getOnBoardTime() == null ? 0 : this.getOnBoardTime().hashCode() );
         result = 37 * result + ( getOnBoardGate() == null ? 0 : this.getOnBoardGate().hashCode() );
         result = 37 * result + ( getFlgDelay() == null ? 0 : this.getFlgDelay().hashCode() );
         result = 37 * result + ( getFlgCs() == null ? 0 : this.getFlgCs().hashCode() );
         result = 37 * result + ( getAcType() == null ? 0 : this.getAcType().hashCode() );
         result = 37 * result + ( getAcReg() == null ? 0 : this.getAcReg().hashCode() );
         result = 37 * result + ( getCaptain() == null ? 0 : this.getCaptain().hashCode() );
         return result;
   }


public String getPort() {
	return port;
}


public void setPort(String port) {
	this.port = port;
}


public String getNeedCompensation() {
	return needCompensation;
}


public void setNeedCompensation(String needCompensation) {
	this.needCompensation = needCompensation;
}


public String getNeedFood() {
	return needFood;
}


public void setNeedFood(String needFood) {
	this.needFood = needFood;
}


public String getNeedHotel() {
	return needHotel;
}


public void setNeedHotel(String needHotel) {
	this.needHotel = needHotel;
}


public String getEconNumStr() {
	return econNumStr;
}


public void setEconNumStr(String econNumStr) {
	this.econNumStr = econNumStr;
}


public String getPassagerNumStr() {
	return passagerNumStr;
}


public void setPassagerNumStr(String passagerNumStr) {
	this.passagerNumStr = passagerNumStr;
}


public String getPassagerTotalStr() {
	return passagerTotalStr;
}


public void setPassagerTotalStr(String passagerTotalStr) {
	this.passagerTotalStr = passagerTotalStr;
}


public String getLessEtd() {
	return lessEtd;
}


public void setLessEtd(String lessEtd) {
	this.lessEtd = lessEtd;
}


public String getMoreStd() {
	return moreStd;
}


public void setMoreStd(String moreStd) {
	this.moreStd = moreStd;
}


public String getAbnomal() {
	return abnomal;
}


public void setAbnomal(String abnomal) {
	this.abnomal = abnomal;
}



  





}
